/*************************************************************
* cycle.hpp
* 二维圆的定义
* 一个圆可以定义为圆心和半径 
* 
* copyright colburn (bjay@qq.com)
* created 2022.11.18 
*************************************************************/

#ifndef __COLBURN_CYCLE_H__
#define __COLBURN_CYCLE_H__

#include "point.hpp"

const double PI=3.14159265;

class Cycle:public Point{
	double radius;
public:
	Cycle(Point a, double rad):Point(a), radius(rad){}
	double area(){return PI *radius *radius;}
	double perimeter(){return 2*PI*radius;}
	
	Point getCenter(){return *this;}
	double getRadius(){return radius;}
	
	friend ostream &operator<< (ostream &cout, Cycle &p);
};
#endif
 
